package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("shopcart")
@ApiModel("Shopcart对象")
public class Shopcart implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "购物车id",required = true,example = "0")
    private Integer id;

    @TableField("goods_id")
    @ApiModelProperty("商品id")
    private Integer gid;

    @TableField("user_id")
    @ApiModelProperty("用户id")
    private Integer uid;

    @TableField("number")
    @ApiModelProperty("商品销量")
    private Integer number;

    @TableField("price")
    @ApiModelProperty("商品价格")
    private Double price;

    @TableField(exist = false)
    @ApiModelProperty("商品图片")
    private String picture;

    @TableField(exist = false)
    @ApiModelProperty("商品名称")
    private String goodsName;

    @TableField(exist = false)
    @ApiModelProperty("商品总价")
    private Double sumPrice;
}
